package com.atguigu.gulimall.member.service;

import com.atguigu.gulimall.member.excption.PhoneExistException;
import com.atguigu.gulimall.member.excption.UsenameExistException;
import com.atguigu.gulimall.member.vo.MemberRegistVo;
import com.atguigu.gulimall.member.vo.MemberUserLoginVo;
import com.atguigu.gulimall.member.vo.SocilaUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.member.entity.MemberEntity;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/**
 * ??Ա
 *
 * @author lpt@126.com
 * @email sunlightcs@gmail.com
 * @date 2020-09-19 11:22:23
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void regist(MemberRegistVo vo);

    void checkPhoneUnique(String phone) throws PhoneExistException;
    void checkUserUnique(String username) throws UsenameExistException;

    MemberEntity login(MemberUserLoginVo vo);

    MemberEntity login(SocilaUser socilaUser) throws Exception;
}

